﻿<UserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.PlanningPoker.ScrumPlanningPokerCardControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Converter="clr-namespace:ScrumTable.UI.View.Converter;assembly=ScrumTable.UI.View"
             xmlns:Presentation="clr-namespace:Microsoft.Surface.Presentation;assembly=Microsoft.Surface.Presentation"
             xmlns:Localization="clr-namespace:ScrumTable.UI.View.Localization;assembly=ScrumTable.UI.View" Width="90" Height="140" Presentation:SurfaceDragDrop.Drop="OnDrop" SnapsToDevicePixels="True">
    <UserControl.Resources>
        <Converter:ConverterEnumEqual x:Key="ConverterEnum"/>
        <Converter:ConverterBoolVisibility x:Key="ConverterBoolVisibility"/>
        <Converter:ConverterNotBoolVisibility x:Key="ConverterBoolNotVisibility"/>
    </UserControl.Resources>
    <Grid>
        <Border>
            <Grid Name="RootGrid">
                <Grid  Visibility="{Binding IsDummyCard, Converter={StaticResource ConverterBoolNotVisibility}}" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="45"/>
                        <ColumnDefinition Width="45"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="80"/>
                        <RowDefinition Height="35"/>
                        <RowDefinition Height="25"/>
                    </Grid.RowDefinitions>                
                    <Label  Background="{Binding Color }" Grid.ColumnSpan="2" Grid.RowSpan="3" Grid.Column="0"/>
                    <TextBlock  FontFamily="Segoe UI"  Foreground="White" TextWrapping="Wrap" Text="{Localization:Translate Uid=ScrumPoker_RevealCards, Default=[RevealCards]}"  FontWeight="Light"  Visibility="{Binding IsHidden, Converter={StaticResource ConverterBoolVisibility}}" FontSize="14" TextAlignment="Center" Grid.RowSpan="3" Grid.Row="0" Grid.ColumnSpan="2" Padding="0"  HorizontalAlignment="Center" VerticalAlignment="Center"/>                    
                    <Label Foreground="White" Content="{Binding Number}" Grid.RowSpan="3" VerticalAlignment="Center" Background="Transparent" Visibility="{Binding IsHidden, Converter={StaticResource ConverterBoolNotVisibility}}" FontSize="20" Padding="0" Grid.Row="0"  Grid.ColumnSpan="2" FontWeight="Bold"  HorizontalAlignment="Center" />
                    <TextBlock Visibility="{Binding IsHidden, Converter={StaticResource ConverterBoolNotVisibility}}"  Foreground="White" HorizontalAlignment="Left" Grid.RowSpan="3" Grid.Row="0" VerticalAlignment="Bottom"  Margin="5"   Grid.Column="0" Grid.ColumnSpan="2" Text="{Localization:Translate Uid=ScrumPoker_Points, Default=[Points]}" FontSize="12" TextTrimming="CharacterEllipsis" />
                </Grid>
                <Grid Visibility="{Binding IsDummyCard, Converter={StaticResource ConverterBoolVisibility}}">
                    <TextBlock FontFamily="Segoe UI"  Foreground="White" TextWrapping="Wrap" Text="{Localization:Translate Uid=ScrumPoker_NoCard, Default=[NoCard]}"  FontWeight="Light"   FontSize="14" TextAlignment="Center" Padding="0"  HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.2"/>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</UserControl>
